import {RouteRecordRaw} from "vue-router";
import Layout from "@/layout/index.vue";
// 字体图标
import {Browsers} from '@vicons/ionicons5'
import {renderIcon} from "@utils";

const routeName = 'dashboard'


const routes: Array<RouteRecordRaw> = [
    {
        path: '/dashboard',
        name: routeName,
        component: () => Layout,
        redirect: '/dashboard/console',
        meta: {
            title: '控制台',
            icon: renderIcon(Browsers),
            sort: 0
        },
        children: [
            {
                path: 'console',
                name: `${routeName}_console`,
                meta: {
                    title: '控制台',
                    icon: renderIcon(Browsers)
                },
                component: () => import(/* webpackChunkName: "dashboard" */ '@/views/dashboard/index.vue'),
            }
        ]
    }
]

export default routes